<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="/css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="all_main">
  <div class="head_main">
    <div class="main_nav">产品包列表</div>
    <div class="main_soso">
    <form action="/campaign/search_pack_info.shtml">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
		    <td width="19" height="30" align="center"><img src="../images/clean_011.gif" width="16" height="16" /></td>
		    <td>
		      产品名称：
		      <input name="pack.packName" type="text" value="${pack.packName}" style="width:80px;" class="inputwidth01" id="art.realName" maxlength="30" />&nbsp;&nbsp;
		      接包公司：
		      <input name="pack.packOwner" type="text" value="${pack.packOwner}" style="width:80px;" class="inputwidth01" id="art.realName" maxlength="30" />&nbsp;&nbsp;
		      渠道名称:
		      <input name="pack.channelName" type="text" value="${pack.channelName}" style="width:80px;" class="inputwidth01" id="art.realName" maxlength="30" />&nbsp;&nbsp;
		      状态:
		      <select name="pack.state">
		          <option value="">请选择...</option>
		          <option value="1" <c:if test="${pack.state=='1'}">selected="selected"</c:if>>投放</option>
		          <option value="0" <c:if test="${pack.state=='0'}">selected="selected"</c:if>>暂停</option>
		          <option value="2" <c:if test="${pack.state=='2'}">selected="selected"</c:if>>空闲</option>
		      </select> 
		      </td>
		    <td align="left">
		      <input name="input7" type="submit" class="input01" value="搜索" /></td>
		  </tr>
		</table>
    </form>
    </div>
    <div class="main_title">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="5%">编号</th>
          <th width="15%">产品名称</th>
          <th width="15%">接包公司</th>
          <th width="10%">接入价格</th>
          <th width="10%">渠道</th>
          <th width="10%">投放价格</th>
          <th width="10%">查询地址</th>
          <th width="10%">状态</th>
          <th width="10%">操作</th>
          <th></th>
        </tr>
      </table>
    </div>
  </div>
  <div class="content_main">
    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="background_hegh01">
      <c:forEach items="${page_list.list}" var="o">
	      <tr>
	         <td width="5%">${o.id}</td>
	         <td width="15%">
	         <c:choose>
	            <c:when test="${empty o.packUrl}">${o.packName} </c:when>
	            <c:otherwise> <a href="${o.packUrl}">${o.packName}</a></c:otherwise>
	         </c:choose>
	         </td>
	         <td width="15%">${o.packOwner}</td>
	         <td width="10%"><fmt:formatNumber pattern="#0.00" value="${o.packPrice}"></fmt:formatNumber> 元 </td>
	         <td width="10%">${o.channelName}</td>
	         <td width="10%"><fmt:formatNumber pattern="#0.00" value="${o.payPrice}"></fmt:formatNumber> 元 </td>
	         <td width="10%">
	            <c:if test="${!empty o.checkUrl}"> <a href="${o.checkUrl}" target="_blank">访问地址</a></c:if>
	          </td>
	           <td width="10%">
                   <c:choose>
                      <c:when test="${o.state=='1'}"><span style="color:blue;">投放</span></c:when>
                      <c:when test="${o.state=='2'}"><span style="color:green;">空闲</span></c:when>
                      <c:when test="${o.state=='0'}"><span style="color:red;">暂停</span></c:when>
                   </c:choose>	           
	          </td>
	          
	         <td width="10%"><a href="/campaign/to_pack_info.shtml?id=${o.id}">编辑</a>&nbsp;<a href="javascript:void(0);" onclick="_copy(${o.id});">复制</a> </td>
	         <td >&nbsp;</td>
	      </tr>
      </c:forEach>
    </table>
  </div>
  <app:page></app:page>
</div>
</body>
</html>
<script type="text/javascript">

   function _copy(id){
	   if(confirm('确定复制该条数据?')){
		   window.location="/campaign/copy_pack_info.shtml?id="+id;
	   }
   }
</script>
